﻿#ifndef WIDGET_SETTING_H
#define WIDGET_SETTING_H

#include <QWidget>
#include <QSettings>
#include <QComboBox>
#include <QCheckBox>
#include "global_define.h"

namespace Ui {
class widget_setting;
}

class widget_setting : public QWidget
{
    Q_OBJECT

public:
    explicit widget_setting(QWidget *parent = 0);
    ~widget_setting();
    bool checkSetting(int warn = 0);

private slots:
    void on_setting_save_clicked();

    void on_setting_apply_clicked();

signals:
    void sig_setting_changed();

private:
    Ui::widget_setting *ui;
    QSettings *setting_config;
    void readConfig(QComboBox *item, QString key);
    void readConfig(QLineEdit *item, QString key);
    void readConfig(QCheckBox *item, QString key);
};

#endif // WIDGET_SETTING_H
